/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

function checkLogin(){
    
    var mail = document.login.mail.value;
    var pwd = MD5(document.login.passwort.value);
    document.login.reset();
   
   $.post("login.php", {pwd:pwd, ben:mail}, function(erg) {
               
        if(erg){
            document.getElementById('login-container').innerHTML = '';
            document.getElementById('page-header').innerHTML =
                    '<div class="col-md-2 com-md-offset-1 blog-sidebar margin-img">\n\
                    <img src="img/pmblogo.jpg" alt="Logo"/>\n\
                    </div>\n\
                    <div class="col-md-9 blog-main">\n\
                    <h1>PMB-Adressen</h1>\n\
                    </div>';
           
            getContent('Home');
        }else{
            getAlert('Login fehlgeschlagen', '', 'alert-login');
        }    
    });   
}
    
function checkForm(){
    if(document.login.mail.value == "" ||
        document.login.passwort.value == ""){
    getAlert('Bitte Passwort und Mail eingeben!', '', 'alert-login');
    return false;
    }
}

